import request from '@/utils/request'
import type { User, UserQuery } from './type'
//项目用户相关的请求地址
const baseUrl = '/user'

//分页
export const reqUserPage = (
  pageNum: number,
  pageSize: number,
  queryParams: UserQuery,
) =>
  request.post<any, TableResponse<Array<User>>>(`${baseUrl}/page`, {
    pageSize,
    pageNum,
    ...queryParams,
  })

//新增/修改用户
export const reqAddUser = (data: User) => request.post<any, void>(baseUrl, data)
